﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Proggy.Web.Cms.PropertyTypes;
using Proggy.Web.Cms.ContentModel;
using System.ComponentModel.DataAnnotations;

namespace Proggy.Web.Cms.Core.PropertyTypes
{
    [PropertyType("True or false", "~/Areas/ProggyCore/Views/EditorPartials/TrueOrFalseEditor.cshtml")]
    public class TrueOrFalse:PropertyTypeBase,IValidatablePropertyType
    {
        /// <summary>
        /// The saved value
        /// </summary>
        public bool SavedValue { get; set; }

        /// <summary>
        /// Validate
        /// </summary>
        /// <param name="vContext"></param>
        /// <param name="attr"></param>
        /// <returns></returns>
        public Tuple<bool, string> GetIsValid(ValidationContext vContext, ContentModelPropertyTypeAttribute attr)
        {
            return new Tuple<bool, string>(true, null);
        }
    }
}
